<?php
/**********************reids内存命名集合******************************/

/**
 * [redisLongToken description]
 * @Description longtoken命名，[uuid]-refreshToken-来源
 * @Author      FengPQ
 * @DateTime    2020-05-20T22:32:59+0800
 * @param       [type]                   $uuid  [用户uuid]
 * @param       [type]                   $source[端口]
 * @return      [type]                          [description]
 */
function redisLongToken($uuid, $source)
{
    return $uuid . '-' . PRO_NAME . '-refreshToken-' . $source;
}

/**
 * [redisTempLongToken description]
 * @Description templongtoken命名，[uuid]-temp_refreshToken-来源
 * @Author      FengPQ
 * @DateTime    2020-05-20T22:32:59+0800
 * @param       [type]                   $uuid  [用户uuid]
 * @param       [type]                   $source[端口]
 * @return      [type]                          [description]
 */
function redisTempLongToken($uuid, $source)
{
    return $uuid . '-' . PRO_NAME . '-temp_refreshToken-' . $source;
}

/**
 * redisLogger function
 *
 * @Name 日志内存
 * @Desc 方法描述
 * @Author Pekey
 * @Date 2020-08-13
 * @param [type] $ip
 * @param [type] $time
 * @return void
 */
function redisLogger($ip = "", $time = 1)
{
    if ($ip == "") {
        return 'logger-' . PRO_NAME . '-*';
    }
    return 'logger-' . PRO_NAME . '-' . $ip . '-' . $time;
}
